//
//  HDHomeViewController.m
//  OTIS_MD
//
//  Created by 何达达 on 2017/8/17.
//  Copyright © 2017年 hedada. All rights reserved.
//

#import "HDHomeViewController.h"
#import "HDBottomView.h"
#import "HDCareViewController.h"
@interface HDHomeViewController ()

@end

@implementation HDHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"电梯列表";
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passValue:) name:HDNotificationPassValue object:nil];
    [self setup];
}

-(void)passValue:(NSNotification *)notification
{
    NSLog(@"%@",notification.userInfo[@"passValue"]);
}
-(void)viewWillAppear:(BOOL)animated
{
    [self.navigationItem setHidesBackButton:YES];
    
    
}
-(void)setup{
    HDBottomView *custom = [HDBottomView instanceView];
    custom.frame = CGRectMake(0, SCREEN_HEIGHT - 64, SCREEN_WIDTH, 64);
    [self.view addSubview:custom];
    custom.btnClcikBlock = ^(UIButton *btn){
        HDCareViewController *carful = [[HDCareViewController alloc]init];
        [self.navigationController pushViewController:carful animated:YES];
    
    };
    
    

}

@end
